<template>
  <div class="option_warpper">
    <a-table :pagination="false" :columns="columns" :dataSource="data">
      <template #displayOrder="{ record }">
        {{ record.displayOrder + 1 }}
      </template>
    </a-table>
  </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
  components: {},
  props: {
    data: { type: Array, default: () => [] },
  },
  setup() {
    const columns = [
      {
        title: '序号',
        dataIndex: 'displayOrder',
        key: 'displayOrder',
        slots: { customRender: 'displayOrder' },
      },
      {
        title: '提交答卷时间',
        dataIndex: 'createTime',
        key: 'createTime',
      },
      {
        title: '答案文本',
        dataIndex: 'answer',
        key: 'answer',
      },
    ];
    return { columns };
  },
});
</script>
<style lang="less" scoped></style>
